/**
 * Created by George on 2015-06-28.
 */
'use strict';
var F = require('../common/function');
var C = require('../config');
var commonO2o = require('./o2o_service_API');
module.exports = function (app) {
    var self = this;
    var apiPre = C.o2oService;

    var tmpFun = function*() {
        this.I = F.InitI(this);
        this.jsonp = yield commonO2o(this);
    };

    app.post(apiPre + '/', tmpFun);
    app.post(apiPre + '/:actionGroup', tmpFun);
    app.post(apiPre + '/:actionGroup/:apiVer', tmpFun);
    app.post(apiPre + '/:actionGroup/:apiVer/:action', tmpFun);
};
